package com.sdk.es.http.exception;


import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author limaosheng
 * @create 12:12 2021/9/2
 * @desc 错误码
 */
@Getter
@AllArgsConstructor
public enum SaasErrorEnum {
    /**
     * 异常错误码
     */
    COMM_ERROR(0,""),
    ERROR(999,""),
    INTERNAL_SERVER_ERROR(500,"服务器内部错误"),
    PARAM_ERROR(1001,"参数不合法"),
    SAVE_ERROR(1002,"新增失败"),
    UPDATE_ERROR(1003,"更新失败"),
    DELETE_ERROR(1004,"删除失败"),
    NOT_FOUND(1005,"资源不存在"),
    FOUND_NOT_ONE(1006,"符合条件的记录超过一条"),
    PARAM_DETAIL_ERROR(1007,"不支持的参数："),
    QUERY_DETAIL_ERROR(1008,"不支持的查询方式："),
    ONE_PARAM_ERROR(1009,"当前查询只支持单个参数值："),
    PARAM_NULL_ERROR(1010,"参数不能为空："),
    PARAM_SORT_ERROR(1011,"不支持的排序参数："),
    NO_SUCH_INDEX(1012,"索引不存在"),
    STRING_SUM_ERROR(1017,"字符串类型无法sum操作："),
    DATE_SUM_ERROR(1013,"日期类型无法sum操作："),
    SUM_ERROR(1014,"求和失败:"),
    ID_ERROR(1015,"根据ID查询请使用getById"),
    GROUP_BY_ID_ERROR(1016,"ID不支持分组查询"),
    ;

    private Integer key;
    private String desc;
}
